package com.fhMall.api;

import com.fh.modules.oms.vo.OrderVo;
import com.fhMall.request.OrderReturnApplyRequest;
import com.fhMall.request.QueryOrderListRequest;
import com.fhMall.request.SubmitOrderRequest;
import com.fhMall.request.WechatOrderReturnHandleResquest;
import org.springframework.web.bind.annotation.*;

/**
 * 程序名：.java<br>
 * 程序功能 <br>
 * 作成者：xianlin <br>
 * 日期：2019-09-23 11:46<br>
 * 修改履历 <br>
 * 项目名    状态      作成者      日期   <br>
 * --------------------------------------- <br>
 * 新规      xianlin   2019-09-23 11:46 <br>
 * ----------------------------- <br>
 */
public interface OrderFacade {

    @PostMapping("/oms/omsOrderWechat/add")
    @ResponseBody
    String submitOrder(@RequestBody SubmitOrderRequest submitOrderRequest);

    @PostMapping("/oms/omsOrderWechat/payAgain")
    @ResponseBody
    String payAgain(@RequestParam(name = "orderId") Integer orderId, @RequestParam(name = "memberId") Integer memberId);

    @PutMapping("/oms/omsOrderWechat/orderPay")
    @ResponseBody
    String orderPay(@RequestParam(name = "id") String id);

    @GetMapping("/oms/omsOrderWechat/detail")
    @ResponseBody
    String queryOrderInfo(@RequestParam(name = "id") String id);

    @PostMapping("/oms/omsOrderWechat/wechatList")
    @ResponseBody
    String queryOrderList(@RequestBody OrderVo orderVo);

    @PostMapping("/oms/omsOrderWechat/cancle")
    @ResponseBody
    String cancelOrder(@RequestParam(name = "id") Integer id);

    @DeleteMapping("/oms/omsOrderWechat/delete")
    @ResponseBody
    String deleteOrder(@RequestParam(name = "id") Integer id);

    @PostMapping("/oms/omsOrderWechat/confirmRecieve")
    @ResponseBody
    String confirmRecieve(@RequestParam(name = "orderId") Integer orderId, @RequestParam(name = "memberId") Integer memberId);

    @PostMapping("/oms/omsOrderReturn/apply")
    @ResponseBody
    String orderReturnApply(@RequestBody OrderReturnApplyRequest orderReturnApplyRequest);

    @PostMapping("/wechat/order/handleRefund")
    @ResponseBody
    String orderReturnHandle(@RequestBody WechatOrderReturnHandleResquest wechatOrderReturnHandleResquest);

    @PutMapping("/oms/omsOrderWechat/paySuccess")
    @ResponseBody
    void paySuccess(@RequestParam(name = "outTradeNo") String outTradeNo, @RequestParam(name = "transactionId") String transactionId);

    @PutMapping("/oms/omsOrderReturn/returnSuccess")
    @ResponseBody
    void refundSuccess(@RequestParam(name = "outRefundNo") String outRefundNo,
                       @RequestParam(name = "outTradeNo") String outTradeNo,
                       @RequestParam(name = "transactionId") String transactionId);
}
